package com.yunhe.common.util;

import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class ChineseCharUtil {

    private static final Pattern compile = Pattern.compile("[\u4e00-\u9fa5]{1,100}");

    public static List<String> match(String str) {
        List<String> result = new ArrayList<>();
        Matcher matcher = compile.matcher(str);
        while (matcher.find()) {
            result.add(matcher.group());
        }
        return result;
    }
}
